package com.mkirl;

import android.graphics.drawable.Drawable;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.OverlayItem;

public class GameObject {

	OverlayItem overlay;
	GeoPoint geoPoint;
	String objectID;
	String team;
	double latitude;
	double longitude;
	
	//default constructor
	public GameObject (double lat, double lng, String objID, String team) {
		
		//objectID = objID; 
		objectID = "Team A"; //SHOULD USE ABOVE, USE TEAM TO SET ITEM TEAM AND DESCRIPTOR TO MATCH (eventually)
		team = "Team A"; //SET DYNAMICALLY WITH team PARAMETER (eventually)
		overlay = new OverlayItem(new GeoPoint((int)(lat*1000000), (int)(longitude*1000000)), objID, team);
	}
	
	//custom constructor allows setting marker
	public GameObject (GeoPoint point, String objID, Drawable icon, String team) {
		geoPoint = point;
		objectID = objID;
		this.team = team;
		overlay = new OverlayItem(geoPoint, objID, team);
		overlay.setMarker(icon);
	}
	
	public double getLatitude() {
		return latitude;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}
	
	public OverlayItem getOverlay() {
		return overlay;
	}

	public void setOverlay(OverlayItem overlay) {
		this.overlay = overlay;
	}

	public void setGeoPoint(GeoPoint geoPoint) {
		this.geoPoint = geoPoint;
	}

	public String getObjectID() {
		return objectID;
	}

	public void setObjectID(String objectID) {
		this.objectID = objectID;
	}

	public String getTeam() {
		return team;
	}

	public void setTeam(String team) {
		this.team = team;
	}
	
}
